package com.spa.domain.entity;

import com.spa.infrastructure.enums.dict.rule.RuleClassifyEnum;
import com.spa.infrastructure.enums.dict.rule.RuleFlagEnum;
import com.spa.infrastructure.enums.dict.rule.RuleTypeEnum;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
public class Massagist {

    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 最早可约时间
     */
    private Date appointmentTime;

    /**
     * 技师状态：10 休息中 20 可预约 30 服务中
     */
    private Integer status;

    /**
     * 技师状态：10新人技师、20平台优选、30金牌技师
     */
    private Integer type;

    /**
     * 经度
     */
    private String lon;

    /**
     * 纬度
     */
    private String lat;

    /**
     * 介绍
     */
    private String introduce;

    private String name;

    private String workPhoto;

    private String lifePhoto;

    private String lengthOfEmployment;

    private String idCardTails;

    private String idCardFront;

    private String phone;

    private List<MassageServiceEntity> massageServiceEntities;

    /**
     * 门店ID
     */
    private Long shopId;

    private Shop shop;

    /**
     * 门店名称
     */
    private String shopName;

    private Date createTime;

    /**
     * 评分
     */
    private String score;

    /**
     * 收藏标识 true 是收藏  否未收藏
     */
    private boolean userCollectionFlag = false;

    /**
     * 收藏数
     */
    private Long followCount;

    private Integer tag;

    private String cityName;

    /**
     * 从业资格证
     */
    private String qualificationCertificate;

    /**
     * 健康证
     */
    private String healthCertificate;

    /**
     * 订单数
     */
    private Integer selectCount;

    /**
     * 技师服务时长
     */
    private Long serviceTime;

    public static List<Rule> defaultRule() {
        List<Rule> ruleList = new ArrayList<>();

        //订单规则
        Rule orderRule = new Rule();
        orderRule.setType(RuleTypeEnum.$10.getCode());
        orderRule.setFlag(RuleFlagEnum.$10.getCode());
        orderRule.setClassify(RuleClassifyEnum.$10.getCode());
        orderRule.setVal("0.4");
        orderRule.setSerial(1);

        ruleList.add(orderRule);


        //加钟订单规则
        Rule orderExtRule = new Rule();
        orderExtRule.setType(RuleTypeEnum.$20.getCode());
        orderExtRule.setFlag(RuleFlagEnum.$20.getCode());
        orderExtRule.setClassify(RuleClassifyEnum.$10.getCode());
        orderExtRule.setVal("0.4");
        orderExtRule.setSerial(1);

        ruleList.add(orderExtRule);

        return ruleList;
    }

}
